{{include file = "theme/header.tpl"}}
{{include file = "theme/hotgames.tpl"}}
  <!--begin container -->
        <div id="container">
        	
        	<div id="topad">
                <h4 class="h4">-Advertisement-</h4>
                <div class="Home_center_970x90">
<!--                    <img src="{{$smarty.const.WEBSITE_URL}}theme/photo/maintopad.jpg" />-->
                </div>
            </div>
            <div id="main">
                {{include file = "theme/navs.tpl"}}
               <!-- begin all gamelists --> 
                <div class="lists f_l">
                    <h1>{{$str[3]}}</h1>
                    <div id="allgamelists">
  	                    {{foreach from=$games key=k item=item}}
	  	                    <div class="listitem">
	                            <a href="{{$item['href']}}">
	                               <img src="{{$item['img']}}" />
	                            </a>
	                            <a href="{{$item['href']}}" class="item-hover">
	                            	<div class="item-hover-bg">
	                            		 <div class="title">{{$item['game_name']}}</div>
	                            	</div>
	                               
	                            </a>
	                        </div>
	                         {{if $k eq 3}}
	                          	<div>
		                        	<h4 class="h4">-Advertisement-</h4>                    
		                        	<div class="rightad Home_center_300x250" id="home_right_ad_box">
		                       	    </div>
	                        	</div>
	                         {{/if}}
                        
                        {{/foreach}}
                    </div> 
                    
                    
                   <ul class="pagination" id="pagination"></ul>
                </div> 
            	<!-- end all gamelists -->
             </div>     	
        </div>
        <script language="javascript">

            var weburl = '{{$smarty.const.WEBSITE_URL}}';
            $("#pagination").jqPaginator({
                totalPages: {{$totalpage}},
                visiblePages: 15,
                currentPage:  {{$curpage}},
                first: '<li class="first"><a href="{{$pageurl}}1.html">First<\/a><\/li>',
                prev: '<li class="prev"><a href="{{$pageurl}}{upage}.html"><i class="arrow arrow2"><\/i>prev<\/a><\/li>',
                next: '<li class="next"><a href="{{$pageurl}}{dpage}.html">next<i class="arrow arrow3"><\/i><\/a><\/li>',
                last: '<li class="last"><a href="{{$pageurl}}{totalPages}.html">last<\/a><\/li>',
                page: '<li class="page"><a href="{{$pageurl}}{page}.html">{page}<\/a><\/li>',
                onPageChange: function (n) {
                    if(n == "init"){
                        return;
                    }

                }
            });


        </script>
        <!-- end container -->
        
        
{{include file = "theme/root.tpl"}}